<template>
 <div class="yingmoo-media">
   <ym-header></ym-header>
   <ym-medianav></ym-medianav>
   <ym-secondnav></ym-secondnav>
<!--  广告轮播  -->
    <div class="ym-lunbo">
      <el-carousel indicator-position="inside">
        <el-carousel-item v-for="(v,i) in banners" :key="i">
          <img :src="v.imgpath" />
        </el-carousel-item>
      </el-carousel>
    </div>
<!--  电影院媒体  -->
    <div class="yingmoo-passenger-media">
      <div class="column-navbar grey">
        <h1 class="column-title">
          <img class="column-icon" src="../assets/ym-index/icon-yun1.png" />
          <span class="column-name">电影院媒体</span>
          <img class="column-arrow" src="../assets/ym-index/bg-arrow.png" />
        </h1>
        <p class="column-citys">
          <span>北京</span>
          <span>上海</span>
          <span>广州</span>
          <span>重庆</span>
          <span>杭州</span>
          <span>深圳</span>
        </p>
      </div>
      <div class="column-center">
        <div class="center-left">
          <div class="left-button">
            <button>灯箱</button>                           
            <button>海报</button>
            <button>刷屏机</button>
            <button>贴片</button>
            <button>LED显示屏</button> 
            <button>其他</button>
          </div>
          <img v-for="v in list1" :src="v.imgpath" />
        </div>
        <div class="center-right">
          <div class="column-content">
            <dl class="media-model" v-for="n in list2">
              <dt>
                <img width="222px" height="198px" :src="n.imgpath" />
              </dt>
              <dd class="media-text-first" :title='n.name'>{{n.name}}</dd>
              <dd class="media-text-secend">￥{{n.price}}</dd>
              <dd class="media-text-city">{{n.remark}}</span></dd>
            </dl>
          </div>
        </div>
      </div>
    </div>
<!--  学校媒体  -->
    <div class="yingmoo-passenger-media">
      <div class="column-navbar grey">
        <h1 class="column-title">
          <img class="column-icon" src="../assets/ym-index/icon-yun1.png" />
          <span class="column-name">学校媒体</span>
          <img class="column-arrow" src="../assets/ym-index/bg-arrow.png" />
        </h1>
        <p class="column-citys">
          <span>北京</span>
          <span>上海</span>
          <span>广州</span>
          <span>重庆</span>
          <span>杭州</span>
          <span>深圳</span>
        </p>
      </div>
      <div class="column-center">
        <div class="center-left">
          <div class="left-button">
            <button>看板</button>                           
            <button>宣传栏</button>
            <button>桌贴</button> 
            <button>框架</button>
            <button>电视</button>
            <button>其他</button>
          </div>
          <img v-for="v in list3" :src="v.imgpath" />
        </div>
        <div class="center-right">
          <div class="column-content">
            <dl class="media-model" v-for="n in list4">
              <dt>
                <img width="222px" height="198px" :src="n.imgpath" />
              </dt>
              <dd class="media-text-first" :title='n.name'>{{n.name}}</dd>
              <dd class="media-text-secend">￥{{n.price}}</dd>
              <dd class="media-text-city">{{n.remark}}</span></dd>
            </dl>
          </div>
        </div>
      </div>
    </div>
<!--  其他特色媒体  -->
    <div class="yingmoo-passenger-media">
      <div class="column-navbar grey">
        <h1 class="column-title">
          <img class="column-icon" src="../assets/ym-index/icon-yun1.png" />
          <span class="column-name">其他特色区域媒体</span>
          <img class="column-arrow" src="../assets/ym-index/bg-arrow.png" />
        </h1>
        <p class="column-citys">
          <span>北京</span>
          <span>上海</span>
          <span>广州</span>
          <span>重庆</span>
          <span>杭州</span>
          <span>深圳</span>
        </p>
      </div>
      <div class="column-center">
        <div class="center-left">
          <div class="left-button">
            <button>收费站</button>                           
            <button>服务区</button>
            <button>景区</button> 
            <button>停车场</button>
            <button>医院</button>
            <button>广场</button>
            <button>酒店</button>
            <button>银行</button>
            <button>驾校</button>
            <button>高尔夫球场</button>
          </div>
          <img v-for="v in list5" :src="v.imgpath" class="feature-image1"/>
        </div>
        <div class="center-right">
          <div class="column-content">
            <dl class="media-model" v-for="n in list6">
              <dt>
                <img width="222px" height="198px" :src="n.imgpath" />
              </dt>
              <dd class="media-text-first" :title='n.name'>{{n.name}}</dd>
              <dd class="media-text-secend">￥{{n.price}}</dd>
              <dd class="media-text-city">{{n.remark}}</span></dd>
            </dl>
          </div>
        </div>
      </div>
    </div>
<!--  热销排行榜  -->
    <!--<div class="yingmoo-template">
      <div class="column-navbar grey">
        <h1 class="column-title">
          <img class="column-icon" src="../assets/ym-index/icon-yun1.png" />
          <span class="column-name">热销排行榜</span>
          <img class="column-arrow" src="../assets/ym-index/bg-arrow.png" />
        </h1>
        <p class="column-citys">
          <span>银行</span>
          <span>景区</span>
        </p>
      </div>
      <div class="column-content">
        <dl class="media-model" v-for="n in list7">
          <dt>
            <img width="222px" height="198px" :src="n.imgpath" />
          </dt>
          <dd class="media-text-first">{{n.name}}</dd>
          <dd class="media-text-secend">{{n.price}}</dd>
          <dd class="media-text-city">{{n.remark}}</span></dd>
        </dl>
      </div>
    </div>-->
<!--  picture广告位  -->
    <div class="yingmoo-picture">
        <img v-for="v in list8" :src="v.imgpath" />
    </div>
<!--  推荐媒体  -->
    <div class="yingmoo-template">
      <div class="column-navbar grey">
        <h1 class="column-title">
          <img class="column-icon" src="../assets/ym-index/icon-yun1.png" />
          <span class="column-name">推荐媒体</span>
          <img class="column-arrow" src="../assets/ym-index/bg-arrow.png" />
        </h1>
      </div>
      <div class="column-content">
        <dl class="media-model" v-for="n in list9">
          <dt>
            <img width="222px" height="198px" :src="n.imgpath" />
          </dt>
          <dd class="media-text-first" :title='n.name'>{{n.name}}</dd>
          <dd class="media-text-secend">￥{{n.price}}</dd>
          <dd class="media-text-city">{{n.remark}}</span></dd>
        </dl>
      </div>
    </div>
<!--  猜你喜欢  -->
    <!--<div class="yingmoo-template">
      <div class="column-navbar grey">
        <h1 class="column-title">
          <img class="column-icon" src="../assets/ym-index/icon-yun1.png" />
          <span class="column-name">猜你喜欢</span>
          <img class="column-arrow" src="../assets/ym-index/bg-arrow.png" />
        </h1>
      </div>
      <div class="column-content">
        <dl class="media-model" v-for="n in list10">
          <dt>
            <img width="222px" height="198px" :src="n.imgpath" />
          </dt>
          <dd class="media-text-first">{{n.name}}</dd>
          <dd class="media-text-secend">{{n.price}}</dd>
          <dd class="media-text-city">{{n.remark}}</span></dd>
        </dl>
      </div>
    </div>-->
    <ym-footer></ym-footer>
 </div>
</template>
<script>
  import ymHeader from "@/components/ymHeader.vue";
  import ymMedianav from "@/components/ymMedianav.vue";
  import ymFooter from "@/components/ymFooter.vue";
  import ymSecondnav from "@/components/ymSecondnav.vue";
  export default {
    name: "yingmoo-media",
    components: {
      ymHeader,
      ymMedianav,
      ymSecondnav,
      ymFooter
    },
    data() {
      return {
      	requestAddr:this.GLOBAL.addr,
        /* banner数据，方便修改 */
        banners: [{
          imgUrl: require('@/assets/ym-media/feature-lunbo.png')
        }, {
          imgUrl: require('@/assets/ym-media/feature-lunbo.png')
        }, {
          imgUrl: require('@/assets/ym-media/feature-lunbo.png')
        }],
        model: [],
        list1:[],
	    list2:[],
	    list3:[],
	    list4:[],
	    list5:[],
	    list6:[],
	    list7:[],
	    list8:[],
	    list9:[],
	    list10:[],
      }
    },
    mounted(){		
		this.getList(128,3);//轮播
		this.getList(129,1);//
		this.getList(130,8);//
		this.getList(136,1);//
		this.getList(137,8);//
		this.getList(143,1);//
		this.getList(144,8);//
		/*this.getList(155,10);*/
		this.getList(156,1);//
		this.getList(157,10);
		/*this.getList(158,8);*/
	},
	methods:{
		getList:function(adid ,limit){
	  		this.$http({
				url: this.requestAddr+'/GetJson/get/adshow?adid='+adid+"&limit="+limit,
				method: 'JSONP',
			    headers: {'Content-Type': 'application/x-www-form-urlencoded'},
				jsonp: 'callbackparam'
			}).then(res => {
				/*console.log(res.data);*/
				if(res.data != null){
					if(adid == 128){this.banners = res.data;}
					if(adid == 129){this.list1 = res.data;}
					if(adid == 130){this.list2 = res.data;}
					if(adid == 136){this.list3 = res.data;}
					if(adid == 137){this.list4 = res.data;}
					if(adid == 143){this.list5 = res.data;}
					if(adid == 144){this.list6 = res.data;}
					/*if(adid == 155){this.list7 = res.data;}*/
					if(adid == 156){this.list8 = res.data;}
					if(adid == 157){this.list9 = res.data;}
					/*if(adid == 158){this.list10 = res.data;}*/
				}
			}).catch()
		}
	}
  }
</script>

<style scoped lang="less">
  .yingmoo-media {
    width: 100%;
    background-color: #f3f9ff;
    .ym-lunbo {
      width: 100%;
      height: 450px;
      position: absolute;
      top: 234px;
      left: 0;
      z-index: 1;
    }
    .yingmoo-passenger-media {
      width: 1200px;
      margin: 0 auto;
      margin-top: 30px;
      .column-navbar {
        height: 44px;
        line-height: 44px;
        position: relative;
        &.grey {
          background-color: #e6e6e6;
        }
        .column-title {
          position: absolute;
          left: 0;
          top: 0;
          z-index: 1;
          width: 247px;
          color: #fbb03b;
          font-size: 18px;
          background-color: #036eb7;
          .column-icon {
            margin-left: 26px;
          }
          .column-arrow {
            position: absolute;
            right: -26px;
            top: 0;
          }
        }
        .column-citys {
          line-height: 44px;
          width: 395px;
          background: none;
          color: #999999;
          float: right;
          span {
            padding-left: 15px;
            padding-right: 15px;
            font-size: 14px;
          }
        }
      }
      .column-center {
        width: 1200px;
        height: 606px;
        display: flex;
        justify-content: space-between;
        .center-left {
          width: 225px;
          height: 605;
          margin-top: 20px;
          background-color: white;
          .left-button {
            width: 225px;
            height: 145px;
            padding-top: 10px;
            button {
              width: 84px;
              height: 28px;
              margin-left: 19px;
              margin-top: 14px;
              border: 1px solid #dddddd;
              background: none;
              font-size: 13px;
              color: #999999;
            }
            button:hover {
              color: #f29600;
              border: 1px solid #f29600;
            }
          }
          .feature-image1{
            margin-top: 96px;
          }
        }
        .center-right {
          width: 960px;
          .column-content {
            width: 960px;
            background-color: transparent;
            .media-model {
              width: 224px;
              height: 291px;
              margin-top: 22px;
              float: left;
              margin-left: 16px;
              dd {
                background-color: white;
                height: 24px;
                line-height: 24px;
                padding-left: 10px;
              }
              .media-text-first {
                font-size: 14px;
                padding-top: 9px;
                overflow: hidden;
                text-overflow : clip;
                padding-left: 10px;
              }
              .media-text-secend {
                font-size: 12px;
                color: red;
              }
              .media-text-city {
                font-size: 12px;
                color: #999999;
                padding-bottom: 6px;
                span {
                  padding-left: 15px;
                }
              }
            }
          }
        }
      }
    }
    .yingmoo-picture {
      width: 1200px;
      margin: 0 auto;
      margin-top: 30px;
      img {
        width: 100%;
      }
    }
    .yingmoo-template {
      width: 1200px;
      margin: 0 auto;
      margin-top: 30px;
      .column-navbar {
        height: 44px;
        line-height: 44px;
        position: relative;
        &.grey {
          background-color: #e6e6e6;
        }
        .column-title {
          position: absolute;
          left: 0;
          top: 0;
          z-index: 1;
          width: 247px;
          color: #fbb03b;
          font-size: 18px;
          background-color: #036eb7;
          .column-icon {
            margin-left: 26px;
          }
          .column-arrow {
            position: absolute;
            right: -26px;
            top: 0;
          }
        }
        .column-citys {
          line-height: 44px;
          width: 240px;
          background: none;
          color: #999999;
          float: right;
          display: flex;
          span {
            height: 42px;
            display: inline-block;
            padding-left: 20px;
            padding-right: 20px;
            margin-left: 25px;
            margin-right: 25px;
            font-size: 14px;  
          }
          span:hover{
            color: #f29600;
            border-bottom: 2px solid #f29600;
          }
        }
      }
      .column-content {
        width: 1200px;
        height: 616px;
        background-color: transparent;
        .media-model {
          width: 224px;
          height: 290px;
          margin-top: 20px;
          float: left;
          margin-left: 20px;
          &:nth-child(1){
            margin-left: 0;
          }
          &:nth-child(6){
            margin-left: 0;
          }
          dd {
            background-color: white;
            height: 24px;
            line-height: 24px;
            padding-left: 10px;
          }
          .media-text-first {
            font-size: 14px;
            padding-top: 9px;
            overflow: hidden;
            text-overflow : clip;
            padding-left: 10px;
          }
          .media-text-secend {
            font-size: 12px;
            color: red;
          }
          .media-text-city {
            font-size: 12px;

            color: #999999;
            padding-bottom: 6px;
            span {
              padding-left: 15px;
            }
          }
        }
      }
    }
  }

</style>
